/* -*- Mode: c; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
/*
  RefObject (http://code.google.com/p/refobject/)
  Copyright (C) 2010-2011 MIURA Shirow (sharow)
*/

#ifndef INCLUDED_REFBYTEARRAY_H
#define INCLUDED_REFBYTEARRAY_H


#include <RefObject/RefObject.h>

RefTypeObject **RefByteArray_GetTypeObject(void);
int RefByteArray_IsValid(RefObject *aRefObject);
RefObject *RefByteArray_CreateDuplicate(unsigned char *aByteArray, int aLength);
RefObject *RefByteArray_CreateShallow(unsigned char *aByteArray, int aLength);
RefObject *RefByteArray_CreateDuplicateWithAllocator(unsigned char *aByteArray,
                                                     int aLength, RefObject *aRefAllocator);
RefObject *RefByteArray_CreateShallowWithAllocator(unsigned char *aByteArray,
                                                   int aLength, RefObject *aRefAllocator);
unsigned char *RefByteArray_AsByteArray(RefObject *aRefObject);
int RefByteArray_GetLength(RefObject *aRefObject);


#endif
